]> dgit.raspbian.org Git - gnome-shell.git/commit
background: Handle promise rejection from _loadFile()
authorAlessandro Bono <alessandro.bono369@gmail.com>
Tue, 16 Jun 2026 08:47:10 +0000 (10:47 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 29 Jun 2026 17:48:10 +0000 (19:48 +0200)
commit58441f7abd01fd35027d5b96f9ef46a414268326
tree0f91993fe0e3469d015ccfe994d3c510d440c258
parent14184ad278ff33ac7e29fdd6f2ad5e37dd0511ba
background: Handle promise rejection from _loadFile()

This suppresses the following:
```
(gnome-shell:11243): Gjs-WARNING **: 19:15:39.498: Unhandled promise rejection. To suppress
this warning, add an error handler to your promise chain with .catch() or a try-catch block
around your await expression. Stack trace of the failed promise:
_loadFile@resource:///org/gnome/shell/ui/background.js:501:20
_load@resource:///org/gnome/shell/ui/background.js:531:14
_init@resource:///org/gnome/shell/ui/background.js:288:14
Background@resource:///org/gnome/shell/ui/background.js:244:4
getBackground@resource:///org/gnome/shell/ui/background.js:635:30
_createBackgroundActor@resource:///org/gnome/shell/ui/background.js:807:49
_updateBackgroundActor@resource:///org/gnome/shell/ui/background.js:779:39
_createBackgroundActor/changeSignalId<@resource:///org/gnome/shell/ui/background.js:835:18
_emitChangedSignal/this._changedIdleId<@resource:///org/gnome/shell/ui/background.js:321:18
@resource:///org/gnome/shell/ui/init.js:21:20
```

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4253>
(cherry picked from commit 1a9df2b07371116c25bf0751767377df75cbaf6c)
js/ui/background.js